package com.wxq.auth.feign;

import com.wxq.auth.vo.UserLoginVO;
import com.wxq.auth.vo.UserRegisterVO;
import com.wxq.auth.vo.WeiboUser;
import com.wxq.common.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * @author Jim
 * @date 7:40 下午 2022/4/10
 * @description 远程校验用户
 * @email:huwmz04153277@126.com
 */
@FeignClient("yomall-member")
public interface MemberFeignService {
    /**
     * 校验用户
     * @param username
     * @return
     */
    @GetMapping("/member/member/check/user/{username}")
    R checkUser(@PathVariable("username") String username);
    /**
     * 检查手机号是否唯一
     * @param mobile
     * @return
     */
    @GetMapping("/member/member/check/mobile/{mobile}")
    R checkMobile(@PathVariable("mobile") String mobile);

    /**
     * 会员注册
     * @param registerVO
     * @return
     */
    @PostMapping("/member/member/reg")
    R register(UserRegisterVO registerVO);

    /**
     * 会员登陆
     * @param vo
     * @return
     */
    @PostMapping("/member/member/login")
    R login(UserLoginVO vo);

    /**
     * 微博登陆
     * @param weiboUser
     * @return
     */
    @PostMapping("/member/member/oauth/weibo/login")
    R weiboLogin(WeiboUser weiboUser);
}
